import request from '@/store/request'

export function getOSSProperties (dir) {
  return request({
    url: 'oss/getOSSProperties?filePath=' + dir,
    method: 'get',
    dataType: 'josn'
  })
}

export function insertImage (path) {
  return request({
    url: 'system/image/insert',
    method: 'post',
    dataType: 'josn',
    data: {
      path: path
    }
  })
}
export function findImageById (id) {
  return request({
    url: 'system/image/findById/' + id,
    method: 'get',
    dataType: 'josn'
  })
}
export function deleteOssObject (key) {
  return request({
    url: 'oss/deleteObject',
    method: 'POST',
    dataType: 'josn',
    data: {
      objectKey: key
    }
  })
}
